import {Image, View} from "@tarojs/components";
import Taro from "@tarojs/taro";
import './index.scss'

function Index() {
//点击修改头像
  const avatorEdit= ()=>{
    Taro.navigateTo({
      url:'/pages/avatorUp/index'
    })
  }
  //点击编辑昵称
  const nameEdit = ()=>{
    Taro.navigateTo({
      url:'/pages/editName/index'
    })
  }

  //点击编辑简介
  const introduceEdit = ()=>{
    Taro.navigateTo({
      url:'/pages/editIntroduce/index'
    })
  }
  return (
    <View>
      <View style={{backgroundColor:'#fff',height:'80px',lineHeight:'80px'}}>
        <View className='iconfont icon-xiangzuo' style={{position:'absolute',top:'0',left:'0',fontSize:'22px',paddingTop:'6px',display:'flex'}}
              onClick={()=>Taro.navigateBack()}>
          <View style={{fontSize:'14px',paddingLeft:'4px'}}>资料设置</View>
        </View>
        <View style={{textAlign:'center',width:'100%'}}></View>
      </View>
      <View className='list'>
        <View className='item' onClick={avatorEdit}>
          <View>头像</View>
          <View className='center'>
            <Image src='https://img2.baidu.com/it/u=3035872156,255770104&fm=253&app=138&size=w931&n=0&f=PNG&fmt=auto?sec=1658595600&t=1efdb503efe49c5b749b695bb857ca75'></Image>
          </View>
          <View className='icon'>&gt;</View>
        </View>
        <View className='item' onClick={nameEdit}>
          <View>昵称</View>
          <View className='center'>王小谧</View>
          <View className='icon'>&gt;</View>
        </View>
        <View className='item'onClick={introduceEdit}>
          <View>简介</View>
          <View className='center_text'>从业8年，用心为您服务，您的满意就是我最大的追求</View>
          <View className='icon'>&gt;</View>
        </View>
      </View>
    </View>
  );
}

export default Index;
